//构建mongoose的数据模型
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const mongoosePaginate = require('mongoose-paginate');

//定义
var uploadSchema = new mongoose.Schema({
	// name:String,
    fieldname:String,
	originalname:String,//原始图片名字
	encoding:String,//图片大小
	mimetype:String,//图片类型
	destination:String,
	filename:String,
	path:String,
	size:Number,
	tableid: String//图片对应标签的分类

});

uploadSchema.plugin(mongoosePaginate);

module.exports = mongoose.model('Upload',uploadSchema,'upload');
